<% form_for(incident) do |f| %>
	<% if defined?(report_id) %><input type="hidden" name="report_id" value="<%= report_id %>"><% end %>
	<table class="form">
		<% unless incident.new_record? %>
			<tr>
				<td class="name">ID</td>
				<td class="value"><%= incident.id_str %></td>
			</tr>
		<% end %>
		<tr>
			<td class="name">Title</td>
			<td class="value"><%= f.text_field(:title, :style => "width: 400px") %></td>
		</tr>
		<tr>
			<td class="name">Category</td>
			<td class="value"><%= f.select(:category_id, Category.select_options, :include_blank => true) %></td>
		</tr>
		<tr>
			<td class="name">Status</td>
			<td class="value"><%= f.select(:status, %w(fresh workingonit verified resolved ignored)) %></td>
		</tr>
		<tr>
			<td class="name">Place Name</td>
			<td class="value"><%= f.text_field(:place_name) %></td>
		</tr>
		<tr>
			<td class="name">Notes</td>
			<td class="value"><%= f.text_area(:notes, :style => "width: 600px; height: 300px") %></td>
		</tr>
	</table>

	<%= f.submit(incident.new_record? ? "Create" : "Update") %>
	<% unless incident.new_record? %>
		<% fields = %w[authored_at sourcetype sourcename author title content] %>
		<h2>Reports for this incident</h2>
		<%= index_table(Report, @incident.reports, :css_class => "report_listing") %>
	<% end %>
<% end %>